home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
datafiles
/
gfx_formats
/
grib
/
format_g.txt
Wrap
Text File
|
1995-02-13
|
101KB
|
2,353 lines
ii
U.S. DEPARTMENT OF COMMERCE
NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION
NATIONAL WEATHER SERVICE
NATIONAL METEOROLOGICAL CENTER
G R I B
Edition 1
(WMO Code FM 92-VIII Ext.)
THE WMO FORMAT
FOR
THE STORAGE OF WEATHER PRODUCT INFORMATION
AND
THE EXCHANGE OF WEATHER PRODUCT MESSAGES
IN GRIDDED BINARY FORM
John D. Stackpole
Automation Division
Revised
(see overleaf)
March 13, 1992
REVISION HISTORY
March 15, 1991 Original Publication of GRIB Edition 1
June 3, 1991 p.6: Correct originating center
for Montreal to 53
p.7: Add generating process code numbers
for SSI analysis
p.9: Add grid no. 103 to list
of NMC storage grids (Table B)
p.13: Move MARD grid 206 so that the
lat/lon point (35N,95W) falls
exactly on grid point (30,16)
p.14: Move MARD grid 209 so that the
lat/lon point (35N,95W) falls
exactly on grid point (59,31)
p.15: Replace regional West CONUS grid with
regional full CONUS grid, as no. 211
p.16: Replace regional East CONUS grid with
regional full CONUS grid, double
resolution, as no. 212
p.21: additional locally defined parameters
pp.A.1 & A.2: Add optional characters to WMO
header for multi-part messages.
p.A.4: Northern Hemisphere P.S. grid added;
Regional CONUS replaces east & west CONUS
Appendix B: All new: Description of BLOK.
October 11, 1991 p.6: added OPC Fog forecasting model as no.73
p.7&8: added ETA model
p.9&10: added NMC "Super C" grids 104 & 105
p.21: added parameter 136 vertical speed shear
p.35: corrected bit 2 scanning direction
March 13, 1992 p.2: corrected footnote
p.5: clarified "century"
p.16 corrected pole and corner points
p.21: added 137 visibility
deleted 202 (use 57) evaporation
supplied units for 207 & 213
p.30 corrected content of octets 24-27
Then totally reprinted with new pagination.
GRIB Edition 1
INTRODUCTION
The World Meteorological Organization (WMO) Commission for Basic
Systems (CBS) Extraordinary Meeting Number VIII (1985) approved a
general purpose, bit-oriented data exchange format, designated FM 92-
VIII Ext. GRIB (GRIdded Binary). It is an efficient vehicle for
transmitting large volumes of gridded data to automated centers over
high speed telecommunication lines using modern protocols. By packing
information into the GRIB code, messages can be made more compact than
character oriented bulletins, producing faster computer-to-computer
transmissions. GRIB can equally well serve as a data storage format,
generating the same efficiencies relative to information storage and
retrieval devices.
Changes and extensions to GRIB were approved at the regular
meeting of the WMO/CBS in February, 1988; additional changes were
introduced at the CBS/WGDM/Sub-Group on Data Representation meetings in
May 1989 and in October 1990. The last set of changes were of such
structural magnitude as to require a new Edition of GRIB, Edition 1,
which this document describes.
Note: the Edition number is in the same location, relative to the
start of the GRIB message, for all Editions. Thus, decoding programs
can detect which Edition layout to expect in the remaining portion of
the message. This is appropriate for archives of messages encoded in
earlier Editions or during transition periods.
Each GRIB record intended for either transmission or storage
contains single value, or a matrix of values, at an array of grid
points, or a set of spectral coefficients, for parameters at a single
level (or layer) as a continuous bit stream. Logical divisions of the
record are designated as "sections", each of which provides control
information and/or data. A GRIB record consists of six sections, two
of which are optional:
(0) Indicator Section
(1) Product Definition Section (PDS)
(2) Grid Description Section (GDS) - optional
(3) Bit Map Section (BMS) - optional
(4) Binary Data Section (BDS)
(5) '7777' (ASCII Characters)
Most centers require bulletin headers to enable them to receive,
identify, and switch messages; NMC is no exception. The standard WMO
abbreviated heading for GRIB is described in Appendix A.
In this documentation, certain symbols are used to clarify the
contents of octets (groups of eight consecutive binary bits, "bytes" in
American usage). If unadorned letters are used, they are symbolic and
their meanings are described in the text; a decimal number is simply
printed as is; a character or string of characters is represented
inside single quote marks. International Alphabet No. 5, which is
identical in its essential elements to the U.S. National Standard 7-bit
ASCII, is used for character representation in the GRIB code.
Octets are numbered consecutively from the start of each section;
bits within an octet are also numbered from left (the most significant
bit) to right (the least significant bit). Thus an octet with bit 8
set to the value 1 would have the integer value 1; bit 7 set to one
would have a value of 2, etc.
The numbering of Tables in the following text corresponds to the
description of GRIB in the WMO Manual on Codes<1>. Some additional
tables not found in the WMO Manual are indicated by letters.
A final caveat: this document does not include all the features in
GRIB as described in the Manual on Codes. This document selects out
those features which are of particular interest to the National Weather
Service at the present time. Some of the "advanced" features are
alluded to in this document; please refer to the Manual for full
details.
DATA PACKING METHOD.
The code form represents numeric data as a series of binary digits
(bits). Such data representation is independent of any particular
machine representation; by convention data lengths are measured in
octets. Data are coded as binary integers using the minimum number of
bits required for the desired precision. Numeric values, with units as
shown in Table 2, are first scaled by a power of ten to achieve an
appropriate decimal precision, a reference value is subtracted from
them to reduce redundancy and eliminate negative values, and they are
then further scaled by a power of two to pack them into a pre-selected
word length.
The representation of a single value is such that:
Y * 10D = R + (X * 2E)
where
Y = original or unpacked value; units as in Table 2;
D = decimal scale factor, to achieve desired precision
(sign bit, followed by a 15-bit integer);
R = reference value (32 bits);
X = internal value (No. of bits varies for each record);
E = binary scale factor for word-length packing
(sign bit, followed by a 15-bit integer).
The reference value (R) is the minimum value of the decimally
scaled data that is being encoded. R is placed in the Binary Data
Section in four octets as a single precision floating-point number:
sAAAAAAA BBBBBBBB BBBBBBBB BBBBBBBB
where s = sign bit, encoded as 0 => positive
1 => negative
A = 7-bit binary integer, the characteristic
B = 24-bit binary integer, the mantissa.
The appropriate formula to recover the value of R is:
R = (-1)s * 2(-24) * B * 16(A-64)
This formula is the standard IBM representation for a single
precision (real) floating point number. (Consideration is being given
to using the IEEE floating point representation in the future, in a
later Edition of GRIB.)
Both the decimal scaling factor and/or the binary scaling factors
may equal 0. It is not necessary to use the binary scaling to "fit"
the numbers into a prespecified word size; an alternative encoding
practice is to change the word length (the same for all the points, of
course) to accommodate the largest departure from the reference value.
A properly written GRIB decoder should be able to decode either option
with no change in the logic as long as the decoder makes no prior
assumptions about word lengths. All the necessary parameters are
included in the GRIB message, of course.
GRIB CODE FORM:
With the exception of the Indicator Section and the End Section
all octets contain binary values. All sections contain an even number
of octets; the variable length sections are padded with zero values as
necessary. These extra bits must be accounted for in finding one's way
through the sections; their content should be ignored.
SECTION 0: THE INDICATOR SECTION (IS)
The indicator section serves to identify the start of the record
in a human readable form; to indicate the total length of the message,
and to indicate the Edition number of the message. It is always eight
octets long.
Octet no. IS Content
1-4 'GRIB' (Coded CCITT-ITA No. 5) (ASCII);
5-7 Total length, in octets, of GRIB message
(including Section 0);
8 Edition number - currently 1
SECTION 1: THE PRODUCT DEFINITION SECTION (PDS).
The PDS contains indicators for the Parameter table Version, the
originating center, the numerical model (or "generating process") that
created the data, the geographical area covered by the data, the
parameter itself, and the actual values for the appropriate vertical
level or layer, the decimal scale factor, and date/time information.
The PDS is at least 28 octets long but it may be longer if an
originating center chooses to make it so. Users of GRIB messages are
strongly urged to use the length-of-section portion of the PDS to
determine where the next section begins. Do not assume a fixed octet
length.
Octet no. PDS Content
1 - 3 Length in octets of the Product Definition Section
4 Parameter Table Version number.
Currently Version 1 for international exchange
Parameter table version numbers 128-254 are
reserved for local use.
5 Identification of center (See Table 0)
6 Generating process ID number
(allocated by the originating center; See Table A)
7 Grid Identification (geographical location and
area; See Table B)
8 Flag specifying the presence or absence of a GDS
or a BMS (See Table 1)
9 Indicator of parameter and units (See Table 2)
10 Indicator of type of level or layer
(See Tables 3 & 3a)
11-12 Height, pressure, etc. of the level or layer
(See Table 3)
13 Year of century \ Initial (or Reference)
| time of forecast - UTC
14 Month of year |
| or
15 Day of month >
| Start of time period
16 Hour of day | for averaging or
| accumulation of
17 Minute of hour / analyses
18 Forecast time unit (see Table 4)
19 P1 - Period of time (Number of time units)
(0 for analysis or initialized analysis.)
Units of time given by content of octet 18.
20 P2 - Period of time (Number of time units)
or
Time interval between successive analyses,
successive initialized analyses, or forecasts,
undergoing averaging or accumulation.
Units given by octet 18.
21 Time range indicator (See Table 5)
22-23 Number included in average, when octet 21
(Table 5) indicates an average or
accumulation; otherwise set to zero.
24 Number Missing from averages or accumulations.
25 Century of Initial (Reference) time
(=20 until Jan. 1, 2001)
26 Reserved - set to 0
27-28 The decimal scale factor D. A negative value
is indicated by setting the high order bit
(bit No. 1) in octet 27 to 1 (on).
29-40 Reserved (need not be present)
41-... Reserved for originating center use.
Note: Octet 8 may indicate the presence of the Grid Description
Section (GDS) even though octet 7 specifies a predefined grid. In this
case the GDS must describe that grid - this device serves as a
mechanism for transmitting new "predefined" grids to users prior to
their formal publication in this or the official WMO documentation.
TABLES FOR THE PDS
TABLE 0. ORIGINATING CENTER
(PDS Octet 5)
VALUE CENTER
07 US Weather Service - National Met. Center
34 Japanese Meteorological Agency - Tokyo
53 Canadian Meteorological Service - Montreal
58 US Navy - Fleet Numerical Oceanography Center
74 U.K. Met Office - Bracknell
98 European Center for Medium-Range Weather
Forecasts - Reading
TABLE A. Generating Process or Model
(PDS Octet 6)
VALUE MODEL
10 Significant Wind-Wave Forecast Model
19 Limited-area Fine Mesh (LFM) analysis
25 Snow Cover Analysis
39 Nested Grid forecast Model (NGM)
42 Global Optimum Interpolation Analysis (GOI)
from "Aviation" run
43 Global Optimum Interpolation Analysis (GOI)
from "Final" run
44 Sea Surface Temperature Analysis
53 LFM-Fourth Order Forecast Model
64 Regional Optimum Interpolation Analysis (ROI)
.....68 80 wave triangular, 18-layer Spectral model
from "Aviation" run
69 80 wave triangular, 18 layer Spectral model
from "Medium Range Forecast" run
73 Fog Forecast model - Ocean Prod. Center
76 Bias corrected Medium Range Forecast
77 126 wave triangular, 18 layer Spectral model
from "Aviation" run
78 126 wave triangular, 18 layer Spectral model
from "Medium Range Forecast" run
79 Backup from the previous run
81 Spectral Statistical Interpolation (SSI)
analysis from "Aviation" run.
82 Spectral Statistical Interpolation (SSI)
analysis from "Final" run.
83 ETA mesoscale forecast model
TABLE B. GRID IDENTIFICATION
(PDS Octet 7)
INTERNATIONAL EXCHANGE GRIDS
VALUE RESOLUTION AREA GRID GRID
(degrees) COVERAGE SHAPE POINTS
lon x lat (degrees) cols rows
21 5.0 x 2.5 0-180E, 0-90N 37 36 + pole 1333
22 5.0 x 2.5 180W-0, 0-90N 37 36 + pole 1333
23 5.0 x 2.5 0-180E, 90S-0 pole + 37 36 1333
24 5.0 x 2.5 180W-0, 90S-0 pole + 37 36 1333
25 5.0 x 5.0 0-355E, 0-90N 72 18 + pole 1297
26 5.0 x 5.0 0-355E, 90S-0 pole + 72 18 1297
50 2.5 x 1.25 (see note iv) 964
61 2.0 x 2.0 0-180E, 0-90N 91 45 + pole 4096
62 2.0 x 2.0 180W-0, 0-90N 91 45 + pole 4096
63 2.0 x 2.0 0-180E, 90S-0 pole + 91 45 4096
64 2.0 x 2.0 180W-0, 90S-0 pole + 91 45 4096
255 (non-standard grid - defined in the GDS)
NOTES ON INTERNATIONAL EXCHANGE GRIDS:
(i) The grid points are laid out in a linear array such that
the longitude index (the columns) is the most rapidly varying. For the
northern hemisphere grids the first point in the record is at the
intersection of the western-most meridian and southern-most circle of
latitude; the last point is the single polar value (see note iii,
below). For the southern hemisphere grids the first point in the
record is the single polar value (see note iii, below); the last point
is at the intersection of the eastern-most meridian and northern-most
circle of latitude. For those familiar with FORTRAN subscripting
conventions, longitude is the first subscript, latitude the second.
(ii) In grids 21 through 26, and 61 through 64, the values on
the shared boundaries are included in each area.
(iii) The datum for the pole point is given only once in each
grid. The user must expand, if desired, the single pole point value to
all the pole "points" at the pole row of a latitude-longitude grid.
Scalar quantity values are the same for all pole points on a the grid.
Wind components at the poles are given by the formulae:
u = -speed * sin(dd) & v = -speed * cos(dd)
where dd is the direction of the wind as reported according to the
specification of wind direction at the poles (refer to WMO Manual
on Codes <1>, code table 878).
The WMO convention can be given this operational definition: At
the North Pole, face into the wind and report the value of the west
longitude meridian along which the wind is coming at you; at the South
Pole do likewise but report the east longitude meridian value. This is
equivalent to placing the origin of a right-handed Cartesian coordinate
system on the North Pole with the y-axis pointing to the prime (0
degree) meridian and the x-axis pointing to the 90 degrees west
meridian, and then resolving any vector wind at the pole point into
components along those axes. At the South Pole the coordinate axes are
oriented such that the y-axis points toward 180 degrees west. Those
components are the u- and v-values given as the single pair of pole
point winds in the GRIB format.
In terms of a longitude/latitude grid these are the wind
components for the pole point at the 180 degree meridian. For example,
on a 2.5x2.5 degree northern hemisphere grid (145x37 points), with the
abscissa along the equator and the ordinate along the prime meridian,
the transmitted north pole wind components are those that belong at the
gridpoint (73,37). The wind components at the other grid points along
the pole row may be obtained through suitable rotation of the
coordinate system. All the components at the pole row are, of course,
simply representations of the same vector wind viewed from differing
(rotated) coordinate systems. In the southern hemisphere the analogous
situation holds; the single set of transmitted pole point wind
components belong at the gridpoint (73,1).
(iv) Grid 50 is a set of points over the contiguous United
States and environs on a grid extending from 20N (row No. 1) to 60N
(row No. 33) in 1.25 degree intervals. The grid increases in
longitudinal extent from south to north in the following manner:
ROWS NO. POINTS LONGITUDINAL EXTENT
1-4 22 122.5W - 70.0W
5-8 24 125.0W - 67.5W
9-12 26 127.5W - 65.0W
13-16 28 130.0W - 62.5W
17-20 30 132.5W - 60.0W
21-24 32 135.0W - 57.5W
25-28 34 137.5W - 55.0W
29-33 36 140.0W - 52.5W
TABLE B cont.
NMC STORAGE GRIDS
VALUE GRID GRID
INCREMENT
-----------------------------------------------------------------
5 3021-point (53x57) N. Hemisphere polar 190.5 km
stereographic grid oriented 105W; Pole at 60N
at (27,49).
6 2385-point (53x45) N. Hemisphere polar 190.5 km
stereographic grid oriented 105W; Pole at 60N
at (27,49).
27 4225-point (65x65) N. Hemisphere polar 381 km
stereographic grid oriented 80W; Pole at 60N
at (33,33).
28 4225-point (65x65) S. Hemisphere polar 381 km
stereographic grid oriented 100E; Pole at 60S
at (33,33).
29 5365-point (145x37) N. Hemisphere lon- 2.5 degs
gitude/latitude grid for latitudes 0N
to 90N; (1,1) at (0E,0N).
30 5365-point (145x37) S. Hemisphere lon- 2.5 degs
gitude/latitude grid for latitudes 90S
to 0S; (1,1) at (0E,90S).
33 8326-point (181x46) N. Hemisphere lon- 2 degs
gitude/latitude grid for latitudes 0N
to 90N; (1,1) at (0E,0N).
34 8326-point (181x46) S. Hemisphere lon- 2 degs
gitude/latitude grid for latitudes 90S
to 0S; (1,1) at (0E,90S).
100 6889-point (83x83) N. Hemisphere polar 91.452 km
stereographic grid oriented 105W; Pole at 60N
at (40.5,88.5). (NGM Original C-Grid)
101 10283-point (113x91) N. Hemisphere 91.452 km
polar stereographic grid oriented 105W; at 60N
Pole at (58.5,92.5). (NGM "Big C-Grid")
103 3640-point (65x56) N. Hemisphere polar 91.452 km
stereographic grid oriented 105W; Pole at 60N
at (25.5,84.5) (Used by ARL)
68 104 A 16170-point (147x110) N. Hemisphere 90.75464 km
polar stereographic grid oriented 105W; at 60N
pole at (75.5,109.5). (NGM Super C grid)
69 105 A 6889-point (83x83) N. Hemisphere polar 90.75464 km
stereographic grid oriented 105W; at 60N
pole at (40.5,88.5). (U.S. area
subset of NGM Super C grid, used
by ETA model)
255 (non-standard grid - defined in the GDS)
NOTE ON NMC STORAGE GRIDS:
On the polar stereographic grids, the vector wind is resolved into
u and v components with respect to the grid coordinates, i.e., u
represents motion in the direction of increasing x (i) coordinate, v in
the direction of increasing y (j). On the latitude-longitude grids, u
and v are true eastward and northward components, respectively.
However, take note of Table 7, below, which allows for the
specification of other possibilities.
TABLE B, cont.
AWIPS-90 STORAGE AND
TRANSMISSION GRIDS
Note: The following grids are intended for use in the U.S. Weather
Service's Advanced Weather Information Processing System for the 1990s
(AWIPS-90). Their definition is subject to change as the AWIPS-90
requirements are further refined.
VALUE AWIPS GRID DESCRIPTIONS
(See Table C for definition of symbols)
-----------------------------------------------------------------
201 Hemispheric
(polar stereographic)
Nx = 65
Ny = 65
La1 = -20.826N = 20.826S
Lo1 = 210.000E = 150.000W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 255.000E = 105.000W
Dx = Dy = 381.000 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
The pole point is at (I,J) = (33,33)
Map 201 is the same as NMC storage grid 27, except it is rotated to 105
deg. orientation.
202 National - CONUS
(polar stereographic)
Nx = 65
Ny = 43
La1 = 7.838N
Lo1 = 218.972E = 141.028W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 255.000E = 105.000W
Dx = Dy = 190.500 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 7.838N, 141.028W
(1,43) = 35.616N, 168.577E
(65,43) = 35.617N, 18.576W
(65,1) = 7.838N, 68.973W
The pole point is at (I,J) = (33,45)
-----------------------------------------------------------------
203 National - Alaska
(polar stereographic)
Nx = 45
Ny = 39
La1 = 19.132N
Lo1 = 174.163E = 185.837W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 210.000E = 150.000W
Dx = Dy = 190.500 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 19.132N, 174.163E
(1,39) = 44.646N, 115.601E
(45,39) = 57.634N, 53.660W
(45,1) = 24.361N, 123.434W
The pole point is at (I,J) = (27,37)
-----------------------------------------------------------------
204 National - Hawaii
(Mercator)
Ni = 79
Nj = 71
La1 = 29.263S
Lo1 = 129.470E
Res.& Comp. flag = 1 0 0 0 0 0 0 0
La2 = 60.547N
Lo2 = 111.096W
Latin = 20.000
Scanning Mode (Bits 1 2 3) = 0 1 0
Di = Dj = 160.000 km
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 29.263S, 129.470E
(1,71) = 60.547N, 129.470E
(79,71) = 60.547N, 111.096W
(79,1) = 29.263S, 111.096W
The longitudinal grid spacing is 1.706 degrees.
-----------------------------------------------------------------
205 National - Puerto Rico
(polar stereographic)
Nx = 45
Ny = 39
La1 = 0.616N
Lo1 = 275.096E = 84.904W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 300.000E = 60.000W
Dx = Dy = 190.500 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 0.616N, 84.904W
(1,39) = 36.257N, 115.304W
(45,39) = 45.620N, 15.000W
(45,1) = 3.389N, 42.181W
The pole point is at (I,J) = (27,57)
-----------------------------------------------------------------
206 Regional - Central US MARD
(Lambert Conformal)
Nx = 51
Ny = 41
La1 = 22.289N
Lo1 = 242.009E = 117.991W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 265.000E = 95.000W
Dx = Dy = 81.2705 km
Projection Flag = 0 (not bipolar)
Scanning Mode (Bits 1 2 3) = 0 1 0
Latin 1 = 25.000N
Latin 2 = 25.000N (tangent cone)
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 22.289N, 117.991W
(1,41) = 50.081N, 124.898W
(51,41) = 50.072N, 73.182W
(51,1) = 23.142N, 78.275W
The Dx, Dy grid increment (at 25 deg north) was selected so that the
grid spacing would be exactly 80.000 km at 35 deg north; the
intersection of 35N & 95W falls on point (30,16).
-----------------------------------------------------------------
207 Regional - Alaska
(polar stereographic)
Nx = 49
Ny = 35
La1 = 42.085N
Lo1 = 184.359E = 175.641W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 210.000E = 150.000W
Dx = Dy = 95.250 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 42.085N, 175.641W
(1,35) = 63.976N, 153.689E
(49,35) = 63.976N, 93.689W
(49,1) = 42.085N, 124.359W
The pole point is at (I,J) = (25,51)
208 Regional - Hawaii
(Mercator)
Ni = 25
Nj = 25
La1 = 10.656N
Lo1 = 193.781E = 166.219W
Res.& Comp. flag = 1 0 0 0 0 0 0 0
La2 = 27.917N
Lo2 = 147.844W
Latin = 20.000
Scanning Mode (Bits 1 2 3) = 0 1 0
Di = Dj = 80.000 km
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 10.656N, 166.219W
(1,25) = 27.917N, 166.219W
(25,25) = 27.917N, 147.844W
(25,1) = 10.656N, 147.844W
The longitudinal grid spacing is 0.766 degrees
-----------------------------------------------------------------
209 Regional - Central US MARD - Double Res.
(Lambert Conformal)
Nx = 101
Ny = 81
La1 = 22.289N
Lo1 = 242.00962E = 117.991W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 265.000E = 95.000W
Dx = Dy = 40.63525 km
Projection Flag = 0 (not bipolar)
Scanning Mode (Bits 1 2 3) = 0 1 0
Latin 1 = 25.000N
Latin 2 = 25.000N (tangent cone)
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 22.289N, 117.991W
(1,81) = 50.081N, 124.898W
(101,81) = 50.072N, 73.182W
(101,1) = 23.142N, 78.275W
The Dx, Dy grid increment (at 25 deg north) was selected so that the
grid spacing would be exactly 40.000 km at 35 deg north; the
intersection of 35N & 95W falls on point (59,31).
210 Regional - Puerto Rico
(Mercator)
Ni = 25
Nj = 25
La1 = 9.000N
Lo1 = 283.000E = 77.000W
Res.& Comp. flag = 1 0 0 0 0 0 0 0
La2 = 26.422N
Lo2 = 58.625W
Latin = 20.000
Di = Dj = 80.000 km
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 9.000N, 77.000W
(1,25) = 26.422N, 77.000W
(25,25) = 26.422N, 58.625W
(25,1) = 9.000N, 58.626W
The longitudinal grid spacing is 0.766 degrees
-----------------------------------------------------------------
211 Regional - CONUS
(Lambert Conformal)
Nx = 93
Ny = 65
La1 = 12.190N
Lo1 = 226.541E = 133.459W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 265.000E = 95.000W
Dx = Dy = 81.2705 km
Projection Flag = 0 (not bipolar)
Scanning Mode (Bits 1 2 3) = 0 1 0
Latin 1 = 25.000N
Latin 2 = 25.000N (tangent cone)
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 12.190N, 133.459W
(1,65) = 54.536N, 152.856W
(93,65) = 57.290N, 49.385W
(93,1) = 14.335N, 65.091W
The Dx, Dy grid increment (at 25 deg north) was selected so that the
grid spacing would be exactly 80.000 km at 35 deg north; the
intersection of 35N & 95W falls on point (53,25).
212 Regional - CONUS - double resolution
(Lambert Conformal)
Nx = 185
Ny = 129
La1 = 12.190N
Lo1 = 226.514E = 133.459W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 265.000E = 95.000W
Dx = Dy = 40.63525 km
Projection Flag = 0 (not bipolar)
Scanning Mode (Bits 1 2 3) = 0 1 0
Latin 1 = 25.000N
Latin 2 = 25.000N (tangent cone)
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 12.190N, 133.459W
(1,129) = 54.536N, 122.856W
(185,129) = 57.290N, 49.385W
(185,1) = 14.335N, 65.091W
The Dx, Dy grid increment (at 25 deg north) was selected so that the
grid spacing would be exactly 80.000 km at 35 deg north; the
intersection of 35N & 95W falls on point (105,49).
-----------------------------------------------------------------
213 National - CONUS - Double Resolution
(polar stereographic)
Nx = 129
Ny = 85
La1 = 7.838N
Lo1 = 218.972E = 141.028W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 255.000E = 105.000W
Dx = Dy = 95.250 km
Projection Flag (Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 7.838N, 141.028W
(1,85) = 35.617N, 168.577E
(129,85) = 35.617N, 18.577W
(129,1) = 7.838N, 68.973W
The pole point is at (I,J) = (65,89)
-----------------------------------------------------------------
214 Regional - Alaska - Double Resolution
(polar stereographic)
Nx = 97
Ny = 69
La1 = 42.085N
Lo1 = 184.359E = 175.641W
Res.& Comp. flag = 0 0 0 0 1 0 0 0
Lov = 210.000E = 150.000W
Dx = Dy = 47.625 km
Projection Flag(Bit 1) = 0
Scanning Mode (Bits 1 2 3) = 0 1 0
For reference here are the lat/lon values of the corners of the grid:
(1,1) = 42.085N, 175.641W
(1,69) = 63.975N, 153.690E
(97,69) = 63.975N, 93.689W
(97,1) = 42.085N, 124.358W
The pole point is at (I,J) = (49,101)
-----------------------------------------------------------------
TABLE 1. FLAG FOR GDS OR BMS
(PDS Octet 8)
The bit flag indicates the omission or inclusion of the Grid
Description and/or Bit Map Sections.
BIT VALUE MEANING
1 0 GDS Omitted
1 GDS Included
2 0 BMS Omitted
1 BMS Included
3-8 0 reserved
TABLE 2. PARAMETERS & UNITS
Version 1
(PDS Octet 9)
VALUE PARAMETER UNITS
000 Reserved
001 Pressure Pa
002 Pressure reduced to MSL Pa
003 Pressure tendency Pa/s
004
005
006 Geopotential m2/s2
007 Geopotential height gpm
008 Geometric height m
009
010
011 Temperature deg. K
012 Virtual temperature deg. K
013 Potential temperature deg. K
014 Pseudo-adiabatic potential temperature deg. K
015 Maximum temperature deg. K
016 Minimum temperature deg. K
017 Dew point temperature deg. K
018 Dew point depression (or deficit) deg. K
019 Lapse rate deg. K/m
020
021 Radar Spectra (1) -
022 Radar Spectra (2) -
023 Radar Spectra (3) -
024
025 Temperature anomaly deg. K
026 Pressure anomaly Pa
027 Geopotential height anomaly gpm
028 Wave Spectra (1) -
029 Wave Spectra (2) -
030 Wave Spectra (3) -
031 Wind direction deg. true
032 Wind speed m/s
033 u-component of wind m/s
034 v-component of wind m/s
035 Stream function m2/s
036 Velocity potential m2/s
037
038 Sigma coord. vertical velocity /s
039 Pressure Vertical velocity Pa/s
040 Geometric Vertical velocity m/s
041 Absolute vorticity /s
042 Absolute divergence /s
043 Relative vorticity /s
044 Relative divergence /s
045 Vertical u-component shear /s
046 Vertical v-component shear /s
047 Direction of current deg. true
048 Speed of current m/s
049 u-component of current m/s
050 v-component of current m/s
051 Specific humidity kg/kg
052 Relative humidity %
053 Humidity mixing ratio kg/kg
054 Precipitable water kg/m2
055 Vapor pressure Pa
056 Saturation deficit Pa
057 Evaporation kg/m2
058
059 Precipitation rate kg/m2/s
060 Thunderstorm probability %
061 Total precipitation kg/m2
062 Large scale precipitation kg/m2
063 Convective precipitation kg/m2
064 Snowfall rate water equivalent kg/m2s
065 Water equiv. of accum. snow depth kg/m2
066 Snow depth m
067 Mixed layer depth m
068 Transient thermocline depth m
069 Main thermocline depth m
070 Main thermocline anomaly m
071 Total cloud cover %
072 Convective cloud cover %
073 Low cloud cover %
074 Medium cloud cover %
075 High cloud cover %
076 Cloud water kg/m2
077
078
079
080
081 Land-sea mask (1=land; 0=sea) 1/0
082 Deviation of sea level from mean m
083 Surface roughness m
084 Albedo %
085 Soil temperature deg. K
086 Soil moisture content kg/m2
087 Vegetation %
088 Salinity kg/kg
089 Density kg/m3
090
091 Ice concentration (ice=1; no ice=0) 1/0
092 Ice thickness m
093 Direction of ice drift deg. true
094 Speed of ice drift m/s
095 u-component of ice drift m/s
096 v-component of ice drift m/s
097 Ice growth m
098 Ice divergence /s
099
100 Significant height of combined wind m
waves and swell
101 Direction of wind waves deg. true
102 Significant height of wind waves m
103 Mean period of wind waves s
104 Direction of swell waves deg. true
105 Significant height of swell waves m
106 Mean period of swell waves s
107 Primary wave direction deg. true
108 Primary wave mean period s
109 Secondary wave direction deg. true
110 Secondary wave mean period s
111 Net shortwave radiation (surface) W/m2
112 Net longwave radiation (surface) W/m2
113 Net shortwave radiation (top of atmos.)W/m2
114 Net longwave radiation (top of atmos.) W/m2
115 Long wave radiation W/m2
116 Short wave radiation W/m2
117 Global radiation W/m2
118
119
120
121 Latent heat flux W/m2
122 Sensible heat flux W/m2
123 Boundary layer dissipation W/m2
124
125
126
127 Image data
(128 - 254 Reserved for use by originating center)
NWS usage as follows...
131 Surface lifted index Deg. K
132 Best (4 layer) lifted index Deg. K
133 K index Deg. K
134 Sweat index Deg. K
135 Horizontal moisture divergence kg/kg/s
136 Vertical speed shear /s
137 Visibility m
201 Ice-free water surface %
207 Moisture availability %
208 Exchange coefficient (kg/m3)(m/s)
209 No. of mixed layers next to surface integer
213 Amount of non-convective cloud %
216 Temperature tendency by all radiation Deg.K/s
220 Natural log of surface pressure ln(kPa)
222 5-wave geopotential height gpm
255 Missing
Notes:
1) By convention, downward fluxes of radiation or other
quantities are assigned negative values; upward
fluxes of radiation or other quantities are
assigned positive values.
2) The u and v components of vector quantities are defined
with reference to GDS Octet 17 and Table 7.
3) provision is made for three types of spectra:
1) Direction and Frequency
2) Direction and radial number
3) Radial number and radial number
TABLE 3. TYPE AND VALUE OF LEVEL
(PDS Octets 10, 11, & 12)
Octet Number 10 Number 11 Number 12
VALUE MEANING CONTENTS
|---------------------------+-----------------+----------------|
| 0 - 99 special codes, | 0 | 0 |
| see Table 3a | | |
|---------------------------+-----------------+----------------|
| 100 isobaric level | pressure in hectoPascals (hPa) |
| | (2 octets) |
|---------------------------+-----------------+----------------|
| 101 layer between two | pressure of | pressure of |
| isobaric levels | top (kPa) | bottom (kPa) |
|---------------------------+-----------------+----------------|
| 102 mean sea level | 0 | 0 |
|---------------------------+-----------------+----------------|
| 103 fixed height level| height above mean sea level |
| | (MSL) in meters |
|---------------------------+-----------------+----------------|
| 104 layer between two | height of top | height of |
| height levels | (hm) | bottom (hm) |
| above msl | | |
|---------------------------+-----------------+----------------|
| 105 fixed height above| height in meters |
| ground | (2 octets) |
|---------------------------+-----------------+----------------|
| 106 layer between two | height of top | height of |
| height levels | (hm) | bottom (hm) |
| above ground | | |
|---------------------------+-----------------+----------------|
| 107 sigma level | sigma value in 1/10000 |
| | (2 octets) |
|---------------------------+-----------------+----------------|
| 108 layer between two | sigma value at | sigma value |
| sigma levels | top | at bottom |
| | in 1/100 | in 1/100 |
|---------------------------+-----------------+----------------|
| 111 depth below | centimeters |
| land surface | (2 octets) |
|---------------------------+-----------------+----------------|
| 112 layer between two | depth of upper | depth of lower |
| depths below | surface (cm) | surface (cm) |
| land surface | | |
|---------------------------+-----------------+----------------|
| 121 layer between two | 1100 hPa minus | 1100 hPa minus |
| isobaric surfaces | pressure of | pressure of |
| (high precision) | top, in hPa | bottom, in hPa |
|---------------------------+-----------------+----------------|
|---------------------------+-----------------+----------------|
| 128 layer between two | 1.1 minus sigma| 1.1 minus sigma|
| sigma levels | of top, in | of top, in |
| (high precision) | 1/1000 of sigma| 1/1000 of sigma|
|---------------------------+-----------------+----------------|
| 141 layer between two | pressure of | 1100hPa minus |
| isobaric surfaces | top, in kPa | pressure of |
| (mixed precision) | | bottom, in hPa |
|---------------------------+-----------------+----------------|
| 160 depth below | meters |
| sea level | (2 octets) |
|---------------------------+-----------------+----------------|
Note: The numbering allows for additions within this framework:
100-119 normal precision
120-139 high precision
140-159 mixed precision
TABLE 3a. SPECIAL LEVELS
(PDS Octet 10)
VALUE LEVEL
01 surface (of the Earth, which
includes sea surface)
02 cloud base level
03 cloud top level
04 0 deg isotherm level
05 adiabatic condensation level
06 maximum wind speed level
07 tropopause level
08-99 reserved
TABLE 4. FORECAST TIME UNIT
(PDS Octet 18)
VALUE TIME UNIT
0 minute
1 hour
2 day
3 month
4 year
5 decade
6 normal (30 years)
7 century
8-253 reserved
254 second
TABLE 5.
TIME RANGE INDICATOR
(PDS Octet 21)
VALUE MEANING
0 Forecast product valid
at reference time + P1 (P1>0),
or
Uninitialized analysis product
for reference time (P1=0).
or
Image product
for reference time (P1=0)
1 Initialized analysis product
for reference time (P1=0).
2 Product with a valid time ranging
between reference time + P1 and
reference time + P2
3 Average
(reference time + P1 to
reference time + P2)
4 Accumulation
(reference time + P1 to
reference time + P2)
product considered valid at
reference time + P2
5 Difference
(reference time + P2 minus
reference time + P1)
product considered valid at
reference time + P2
6-9 reserved
10 P1 occupies octets 19 and 20;
product valid at reference time + P1
11-112 reserved
113 Average of N forecasts (or initialized
analyses); each product has forecast
period of P1 (P1=0 for initialized
analyses); products have reference
times at intervals of P2, beginning at
the given reference time.
114 Accumulation of N forecasts (or
initialized analyses); each product
has forecast period of P1 (P1=0 for
initialized analyses); products have
reference times at intervals of P2,
beginning at the given reference time.
115 Average of N forecasts, all with the
same reference time; the first has a
forecast period of P1, the remaining
forecasts follow at intervals of P2.
116 Accumulation of N forecasts, all with
the same reference time; the first has
a forecast period of P1, the remaining
follow at intervals of P2.
117 Average of N forecasts, the first has a
period of P1, the subsequent ones have
forecast periods reduced from the previous
one by an interval of P2; the reference
time for the first is given in octets 13-
17, the subsequent ones have reference
times increased from the previous one by an
interval of P2. Thus all the forecasts
have the same valid time, given by the
initial reference time + P1.
118 -122 reserved
123 Average of N uninitialized analyses,
starting at the reference time,
at intervals of P2.
124 Accumulation of N uninitialized
analyses, starting at the reference
time, at intervals of P2.
125-254 reserved
NOTES:
1) For analysis products, or the first of a series of analysis
products, the reference time (octets 13 to 17) indicates the valid
time.
2) For forecast products, or the first of a series of forecast
products, the reference time indicates the valid time of the
analysis upon which the (first) forecast is based.
3) Initialized analysis products are allocated numbers distinct from
those allocated to uninitialized analysis products.
4) A value of 10 allows the period of a forecast to be extended over
two octets; this is to assist with extended range forecasts.
5) Where products or a series of products are averaged or
accumulated, the number involved is to be represented in octets 22-
23 of Section 1, while any number missing is to be represented in
octet 24.
6) Forecasts of the accumulation or difference of some quantity (e.g.
quantitative precipitation forecasts), indicated by values of 4 or
5 in octet 21, have a product valid time given by the reference
time + P2; the period of accumulation, or difference, can be
calculated as P2 - P1.
A few examples may help to clarify the use of Table 5:
For analysis products P1 is zero and the time range indicator is
also zero; for initialized products (sometimes called "zero hour
forecasts") P1 is zero, but octet 21 is set to 1.
For forecasts, typically, P1 contains the number of hours of the
forecast (the unit indicator given in octet 18 would be 1) and octet 21
contains a zero.
Value 115 would be used, typically, for multiple day mean
forecasts, all derived from the same initial conditions.
Value 117 would be used, typically, for Monte Carlo type
calculations: many forecasts valid at the same time from different
initial (reference) times.
Averages, accumulations, and differences get a somewhat
specialized treatment. If octet 21 (Table 5) has a value between 2 and
5 (inclusive) then the reference time + P1 is the initial date/time and
the reference time + P2 is the final date/time of the period over which
averaging or accumulation takes place. If, however, octet 21 has a
value of 113, 114, 115, 116, 117, 123, or 124 then P2 specifies the
time interval between each of the fields (or the forecast initial
times) that have been averaged or accumulated. These latter values of
octet 21 require the quantities averaged to be equally separated in
time; the former values, 3 and 4 in particular, allow for irregular or
unspecified intervals of time between the fields that are averaged or
accumulated.
SECTION 2: GRID DESCRIPTION SECTION (GDS)
The purpose of the (optional) GDS is to provide a grid description
for grids not defined by number in Table 3.
Octet no. GDS Content
1 - Length in octets of the Grid Description Section
4 NV, the number of vertical coordinate parameters
5 PV, the location (octet number) of the list of
vertical coordinate parameters, if present
or
PL, the location (octet number) of the list of
numbers of points in each row (when no vertical
parameters are present), if present
or
255 (all bits set to 1) if neither are present
6 Data representation type (See Table 6)
7 - 32 Grid description, according to data
representation type, except Lambert or Mercator.
7 - 42 Grid description for Lambert or Mercator grid
PV List of vertical coordinate parameters
(length = NV x 4 octets);
if present, then PL = 4 x NV + PV
PL List of numbers of points in each row, used for
quasi-regular grids
(length = NROWS x 2 octets, where NROWS is the
total number of rows defined within the grid
description)
Note: NV, PV, and PL relate to "advanced" features of GRIB
not, at present, in use in the National Weather Service.
See the WMO Manual on Codes<1> for the descriptions of
those features.
TABLES FOR THE GDS
TABLE 6. DATA REPRESENTATION TYPE
(GDS Octet 6)
VALUE MEANING
0 Latitude/Longitude Grid
also called Equidistant Cylindrical
or Plate Carree projection grid
1 Mercator Projection Grid
2 Gnomonic Projection Grid
3 Lambert Conformal, secant or
tangent, conical or bipolar
(normal or oblique) Projection Grid
4 Gaussian Latitude/Longitude Grid
5 Polar Stereographic Projection Grid
6 - 12 (reserved - see Manual on Codes)
13 Oblique Lambert conformal, secant or
tangent, conical or bipolar,
projection
14 - 49 (reserved - see Manual on Codes)
50 Spherical Harmonic Coefficients
51 - 89 (reserved - see Manual on Codes)
90 Space view perspective or
orthographic grid
91 - 254 (reserved - see Manual on Codes)
TABLE C. Sundry Grid Descriptions
LATITUDE/LONGITUDE GRIDS
(GDS Octets 7 - 32)
OCTET NO. CONTENT & MEANING
7 - 8 Ni - No. of points along a latitude circle
9 - 10 Nj - No. of points along a longitude meridian
11 - 13 La1 - latitude of first grid point
units: millidegrees (degrees x 1000)
values limited to range 0 - 90,000
bit 1 set to 1 for south latitude
14 - 16 Lo1 - longitude of first grid point
units: millidegrees (degrees x 1000)
values limited to range 0 - 360,000
bit 1 (leftmost) set to 1 for west longitude
17 Resolution and component flags (Table 7)
18 - 20 La2 - Latitude of last grid point
(same units, value range, and bit 1 as La1)
21 - 23 Lo2 - Longitude of last grid point
(same units, value range, and bit 1 as Lo1)
24 - 25 Di - Longitudinal Direction Increment
(west to east)
(same units as Lo1)
(if not given, all bits set = 1)
26 - 27 Regular Lat/Lon Grid:
Dj - Latitudinal Direction Increment
(south to north)
(same units as La1)
(if not given, all bits set = 1)
Gaussian Grid:
N - number of latitude circles between
a pole and the equator
Mandatory if Gaussian Grid specified
28 Scanning mode flags (See Table 8)
29 - 32 Reserved (set to zero)
Note: The latitude and longitude of the first and last grid points
should always be given, for regular grids.
POLAR STEREOGRAPHIC GRIDS
(GDS Octets 7 - 32)
OCTET NO. CONTENT & MEANING
7 - 8 Nx - Number of points along x-axis
9 - 10 Ny - Number of points along y-axis
11 - 13 La1 - Latitude of first grid point
14 - 16 Lo1 - Longitude of first grid point
17 Resolution and component flags (see Table 7)
18 - 20 Lov - The orientation of the grid;
i.e., the east longitude value of the
meridian which is parallel to the
y-axis (or columns of the grid) along
which latitude increases as the
y-coordinate increases. (Note: The
orientation longitude may, or may not,
appear within a particular grid.)
21 - 23 Dx - the X-direction grid length
(see Note 2)
24 - 26 Dy - the Y-direction grid length
(see note 2)
27 Projection center flag (see note 5)
28 Scanning mode (see Table 8)
29 - 32 Set to 0 (reserved)
NOTES:
1. Latitude and longitude are in millidegrees (thousandths)
2. Grid lengths are in units of meters, at the 60 degree latitude
circle nearest to the pole in the projection plane.
3. Latitude values are limited to the range 0 - 90,000. Bit 1 is set
to 1 to indicate south latitude.
4. Longitude values are limited to the range 0 - 360,000. Bit one is
set to 1 to indicate west longitude.
5. Octet 27:
Bit 1 set to 0 if the North pole is on the projection plane.
Bit 1 set to 1 if the South pole is on the projection plane.
6. The first and last grid points may not necessarily be the same as
the first and last data points if the bit map section (BMS) is
used.
7. The resolution flag (bit 1 of Table 7) is not applicable.
LAMBERT CONFORMAL SECANT OR TANGENT CONE GRIDS
(GDS Octets 7 - 42)
OCTET NO. CONTENT & MEANING
7 - 8 Nx - Number of points along x-axis
9 - 10 Ny - Number of points along y-axis
11 - 13 La1 - Latitude of first grid point
14 - 16 Lo1 - Longitude of first grid point
17 Resolution and component flags (see Table 7)
18 - 20 Lov - The orientation of the grid;
i.e., the east longitude value of the
meridian which is parallel to the
y-axis (or columns of the grid) along
which latitude increases as the
y-coordinate increases. (Note: The
orientation longitude may, or may not,
appear within a particular grid.)
21 - 23 Dx - the X-direction grid length
(see note 2)
24 - 26 Dy - the Y-direction grid length
(see Note 2)
27 Projection center flag (see note 5)
28 Scanning mode (see Table 8)
29 - 31 Latin 1 - The first latitude from the pole
at which the secant cone cuts the spherical
earth. (See Note 8)
32 - 34 Latin 2 - The second latitude from the pole
at which the secant cone cuts the spherical
earth. (See Note 8)
35 - 37 Latitude of southern pole (millidegrees)
38 - 40 Longitude of southern pole (millidegrees)
41 - 42 Reserved (set to 0)
NOTES:
1. Latitude and longitude are in millidegrees (thousandths)
2. Grid lengths are in units of meters, at the intersection latitude
circle nearest to the pole in the projection plane.
3. Latitude values are limited to the range 0 - 90,000. Bit 1 is set
to 1 to indicate south latitude.
4. Longitude values are limited to the range 0 - 360,000. Bit one is
set to 1 to indicate west longitude.
5. Octet 27:
Bit 1 set to 0 if the North pole is on the projection plane.
Bit 1 set to 1 if the South pole is on the projection plane.
Bit 2 set to 0 if only one projection center used
Bit 2 set to 1 if projection is bipolar and symmetric
6. The first and last grid points may not necessarily be the same as
the first and last data points if the bit map section (BMS) is
used.
7. The resolution flag (bit 1 of Table 7) is not applicable.
8. If Latin 1 = Latin 2 then the projection is on a tangent cone.
MERCATOR GRIDS
(GDS Octets 7 - 42)
OCTET NO. CONTENT & MEANING
7 - 8 Ni - Number of points along a
latitude circle
9 - 10 Nj - Number of points along a
longitude meridian
11 - 13 La1 - Latitude of first grid point
14 - 16 Lo1 - Longitude of first grid point
17 Resolution and component flags (see Table 7)
18 - 20 La2 - latitude of last grid point
21 - 23 Lo2 - longitude of last grid point
24 - 26 Latin - The latitude(s) at which the
Mercator projection cylinder
intersects the earth.
27 Reserved (set to 0)
28 Scanning mode (see Table 8)
29 - 31 Di - the longitudinal direction increment
(see Note 2)
32 - 34 Dj - the latitudinal direction increment
(see note 2)
35 - 42 Reserved (set to 0)
NOTES:
1. Latitude and longitude are in millidegrees (thousandths)
2. Grid lengths are in units of meters, at the circle of latitude
specified by Latin.
3. Latitude values are limited to the range 0 - 90,000. Bit 1 is set
to 1 to indicate south latitude.
4. Longitude values are limited to the range 0 - 360,000. Bit one is
set to 1 to indicate west longitude.
5. The latitude and longitude of the last grid point should always be
given.
6. The first and last grid points may not necessarily be the same as
the first and last data points if the bit map section (BMS) is
used.
SPHERICAL HARMONIC COEFFICIENTS
(GDS Octets 7 - 32)
OCTET NO. CONTENT & MEANING
7 - 8 J - Pentagonal Resolution Parameter
9 - 10 K - Pentagonal Resolution Parameter
11 - 12 M - Pentagonal Resolution Parameter
13 Representation Type (See Table 9)
14 Coefficient Storage Mode (See Table 10)
15 - 32 Set to zero (reserved)
TABLE 7 - RESOLUTION AND COMPONENT FLAGS
(GDS Octet 17)
Bit Value Meaning
1 0 Direction increments not given
1 Direction increments given
2 0 Earth assumed spherical with
radius=6367.47 km
1 Earth assumed oblate spheroid with size
as determined by IAU in 1965:
6378.160 km, 6356.775 km, f = 1/297.0
3-4 reserved (set to 0)
5 0 u- and v-components of vector quantities
resolved relative to easterly and
northerly directions
1 u and v components of vector quantities
resolved relative to the defined grid in
the direction of increasing x and y
(or i and j) coordinates respectively
6-8 reserved (set to 0)
TABLE 8. SCANNING MODE FLAG
(GDS Octet 28)
BIT VALUE MEANING
1 0 Points scan in +i direction
1 Points scan in -i direction
2 0 Points scan in -j direction
1 Points scan in +j direction
3 0 Adjacent points in i direction are consecutive
(FORTRAN: (I,J))
1 Adjacent points in j direction are consecutive
(FORTRAN: (J,I))
Note: i direction is defined as west to east along a parallel of
latitude, or left to right along an x axis.
j direction is defined as south to north along a meridian of
longitude, or bottom to top along a y axis.
TABLE 9. SPECTRAL REPRESENTATION TYPE
(GDS Octet 13)
VALUE MEANING
1 Associated Legendre Polynomials
of the First Kind with normalization
such that the integral equals 1
TABLE 10. COEFFICIENT STORAGE MODE
(GDS Octet 14)
VALUE MEANING
1 The complex coefficients Xnm are stored for m > 0
as pairs of real numbers Re(Xnm), Im(Xnm) ordered
with n increasing from m to N(m), first for m = 0
and then for m = 1, 2, 3,...M. The real part of
the (0,0) coefficient is stored in octets 12-15 of
the BDS, as a floating point number in the same
manner as the packing reference value, with units
as in Table 2. The remaining coefficients,
starting with the imaginary part of the (0,0)
coefficient, are packed according to the GRIB
packing algorithm, with units as given in Table 5,
in octets 16 and onward in the BDS.
NOTES ON SPECTRAL TRUNCATION:
Using the associated Legendre Polynomials of the First Kind, Pnm,
as typical expansion functions, any variable X( , ), which is a
function of longitude, , and sin(latitude), , can be represented by
In the summations, M is the maximum zonal wave number that is to
be included, and K & J together define the maximum meridional total
wave number N(m), which, it should be noted, is a function of m. A
sketch shows the relationships:
In this figure, the ordinate is n the zonal wave number, the
abscissa is m the total meridional wave number, the vertical line at m
= M is the zonal truncation, and the diagonal passing through (0,0) is
the line n = m. The Legendre Polynomials are defined only on or above
this line, that is for n > m. On the n-axis, the horizontal line at n
= K indicates the upper limit to n values, and the diagonal that
intersects the n-axis at n = J indicates the upper limit of the area in
which the Polynomials are defined. The shaded irregular pentagon
defined by the n-axis, the diagonal from n = J, the horizontal n = K,
the vertical m = M, and the other diagonal n = m surrounds the region
of the (n x m) plane containing the Legendre Polynomials used in the
expansion.
This general pentagonal truncation reduces to some familiar common
truncations as special cases:
Triangular: K = J = M and N(m) = J
Rhomboidal: K = J + M and N(m) = J + m
Trapezoidal: K = J, K > M and N(m) = J
In all of the above m can take on negative values to represent the
imaginary part of the spectral coefficients.
SECTION 3: BIT MAP SECTION (BMS).
The purpose of the (optional) BMS is to provide either a bit map
or a reference to a bit map pre-defined by the center. The bit map
consists of contiguous bits with a bit-to-data-point correspondence as
defined in the grid description. A bit set equal to 1 implies the
presence of a datum for that grid point in the BDS; a value of zero
implies the absence of such.
Octet no.
1 - 3 Length in octets of Bit Map Section
4 Number of unused bits at end of Section 3.
5 - 6 Numeric:
Numeric = 0: a bit map follows;
otherwise : the numeric refers to a
predefined bit map provided
by the center
7 - nnn Bit map, zero filled to an even number of octets
SECTION 4: BINARY DATA SECTION (BDS).
The BDS contains the binary scaling information needed to
reconstruct the original data from the packed data. The required
decimal scale factor is found in the PDS, above. The data stream is
zero filled to an even number of octets.
Octet no.
1 - 3 Length in octets of binary data section
4 Bits 1 through 4: Flag - See Table 11
Bits 5 through 8: Number of unused bits at end
of Section 4.
5 - 6 The binary scale factor (E). A negative value
is indicated by setting the high order bit
(bit No. 1) in octet 5 to 1 (on).
7 - 10 Reference value (minimum value); floating
point representation of the number.
11 Number of bits into which a data point is packed
12 - Variable, depending on octet 4; zero
filled to an even number of octets.
NOTE:
If all the data in a grid point field happen to have the same
value, then all of the deviations from the reference value are set to
zero. Since a zero value requires no bits for packing, octet 11 is set
to zero, thus indicating a field of constant data, the value of which
is given by the reference value. Under these circumstances, octet 12
is set to zero (the zero fill to an even number of octets) and bits 5-8
of octet 4 contain an 8. The number of data points in the field is
implied by the grid identification given in the PDS and/or the GDS and
BMS.
The same situation may occur if all of the spectral coefficients,
other than the (0,0) coefficient, have the same value. In this case
octet 16 is set to zero to accomplish the zero fill to an even number
of octets.
TABLES FOR THE BDS
TABLE 11. FLAG
(BDS Octet 4)
Bit Value Meaning
1 0 Grid point data
1 Spherical Harmonic Coefficients
2 0 Simple packing
1 Second order Packing
3 0 Original data were floating point values
1 Original data were integer values
4 0 No additional flags at octet 14
1 Octet 14 contains flag bits 5 - 12
5 Reserved (set to 0)
6 0 Single datum at each grid point
1 Matrix of values at each grid point
7 0 No secondary bit maps
1 Secondary bit maps present
8 0 Second order values have constant width
1 Second order values have different widths
9-12 Reserved (set to 0)
Notes:
(1) Bit 4 is set to 1 to indicate that bits 5 to 12 are contained
in octet 14 of the data section.
(2) Bit 3 is set to 1 to indicate that the original data was
integers; when this is the case any non-zero reference values
should be rounded to an integer value.
(3) When secondary bit maps are present in the data (used in
association with second order packing and, optionally, with a
matrix of values at each point) this is indicated by setting
bit 7 to 1.
At present, the "extension" of Table 11 into octet 14 and the
associated "advanced" features of GRIB is not employed in the National
Weather Service. Thus binary data always begins in octet 12.
SECTION 5: END SECTION
The end section serves a human readable indication of the end of a
GRIB record. It can also be used for computer verification that a
complete GRIB record is available for data extraction. It should not
be used as a search target since a '7777' bit combination could exist
anywhere in the binary data stream.
Octet no.
1-4 '7777' (Coded CCITT-ITA No. 5)
APPENDIX A
OUTLINE OF WMO BULLETIN HEADERS
USED WITH
G R I B
WMO BULLETIN HEADER
The WMO abbreviated heading is used to identify the NMC GRIB
messages; however, it is not a complete description of their content.
The user is cautioned against using the header as the sole determiner
of the record content; she should, of course, rely on the Product
Definition Section for that purpose.
Note: In the following, a hexadecimal number is enclosed in
parentheses followed by the designation "hex".
The information needed to identify the NMC product is contained in
21 octets. The characters are encoded using the CCITT-ITA No. 5, also
known (in the US) as ASCII characters, and are defined as follows:
Octet no. Header Content
1 The character 'H' for GRIB bulletins sent to the NWS Family
of Services and for International Exchange
or
The character 'Y' for GRIB bulletins intended for the NWS
AWIPS program.
2 A letter character specifying the type parameter as shown in
Table A.1.
3 A letter character specifying the grid area as defined in
Table A.2.
4 A letter or numeric character indicating the time difference
between the reference time and valid time of the data as
listed in Table A.3, i.e., the forecast length.
5-6 Numeric characters as defined in Table A.4. Usually the
pressure level, sometimes just a sequence number. Some
values have special level or layer meanings.
7 Blank (20)hex
8-11 Four characters identifying the originating center. These
are always 'KWBC' for NMC-produced messages.
12 Blank (20)hex
13-14 Two numeric characters providing the reference day of the
month (01-31) of the data.
15-18 Four numeric characters providing the reference hour and
minute of the data.
19-22 Four OPTIONAL characters: one blank (20)hex, then 'Pxx',
where xx=01-99. Used to indicate sequential parts of very
long messages that have been divided using the BLOK feature.
See Appendix B.
19-21 OR 23-25 Two ASCII carriage returns and a line feed,
(0D0D0A)hex.
The first six characters are commonly referred to as
T1 T2 A1 A2 ii
In summary...
Generic Meaning of T1 T2 A1 A2 ii:
T1: Type of bulletin: "H" for GRIB messages for
Family of Services and
International Exchange;
"Y" for AWIPS GRIB messages
T2: Type of data/parameter
A1: Grid
A2: Analysis or forecast hour
ii: Numeric. Usually the pressure level, sometimes just a
sequence number. Some values have special level or layer
meanings.
In the following tables, the columns headed AWIPS are
augmentations to the common Family of Services (FOS) and International
Exchange variables. FOS and international GRIB messages (with H as the
initial character) draw upon the left hand columns only. AWIPS GRIB
messages (with Y as the initial character) use letters from both
columns. If both columns contain entries for the same designator, the
T1 character (H or Y) indicates which entry to use.
TABLE A.1 TYPE PARAMETERS - T2
(Header Octet 2)
DESIGNATOR PARAMETER
Usage
FOS & International AWIPS
A
B Vertical Wind Shear
C Vorticity
D Thunderstorm probability
E Total Precipitation
F Precipitable Water
G Convective Precip.
H Height (geopotential)
I
J
K Primary Wave Period
L Primary Wave Direction
M Secondary Wave Period
N Secondary Wave Direction
O Vertical velocity
P Pressure
Q Stability Index
(Best 4-layer index)
R Relative humidity
S Snow
T Temperature
U u wind component
V v wind component
W
X Surface Lifted index
Y
Z
TABLE A.2 GRID DESIGNATOR - A1
(Header Octet 3)
DESIGNATOR GRID Number
(See Table B)
FOS & International AWIPS
A 21 201 - Northern Hemisphere
B 22
C 23
D 24
E 25
F 26
G 50
H 213 - National CONUS with
Double Resolution
I 202 - National CONUS
J 203 - National Alaska
K 204 - National Hawaii
L 205 - National Puerto Rico
M 206 - Regional MARD
N 207 - Regional Alaska
O 208 - Regional Hawaii
P 210 - Regional Puerto Rico
Q 211 - Regional CONUS
R 212 - Regional CONUS with
Double Resolution
S 209 - Regional MARD with
Double Resolution
T 61 214 - Regional Alaska with
Double Resolution
U 62
V 63
W 64
X (Used for experimental transmissions)
Y
Z
TABLE A.3 FORECAST HOUR DESIGNATOR - A2
(Header Octet 4)
DESIGNATOR HOUR
Usage
FOS & International AWIPS (additional)
A 00 hour analysis
B 06 hour fcst
C 12 "
D 18 "
E 24 "
F 30 "
G 36 "
H 42 "
I 48 "
J 60 "
K 72 "
L 84 "
M 96 "
N 108 "
O 120 "
P 132 "
Q 144 "
R 156 "
S 168 "
T 180 "
U 192 "
V 204 "
W 216 "
X 228 "
Y 240 "
Z 0 hour (initialized)
0 (zero) 2 hour fcst
1 4 "
2 8 "
3 10 "
4 14 "
5 16 "
6 20 "
7 22 "
8 54 "
9 66 "
TABLE A.4 LEVEL DESIGNATORS - ii
(Header Octets 5 and 6)
DESIGNATOR LEVEL or LAYER
99 1000 hPa
00 Entire Atmosphere
98 Air Properties at Surface of Earth
97 Level of the tropopause
96 Level of the maximum wind
94 Level of 0 deg C isotherm
93 Land/Water Properties at Surface of
Earth/Ocean
92 Boundary Layer
91 Reduced to Sea Level
18 1828 m level (= 6000 ft)
27 2743 m level (= 9000 ft)
37 3658 m level (= 12000 ft)
Otherwise, the designator given is the hundreds and tens digits of
the hPa level in the atmosphere, e.g. 70=700hPa; 03=30hPa, etc..
APPENDIX B
The BLOK feature
for subdividing large GRIB bulletins
BLOK
The BLOK feature is used to subdivide large GRIB bulletins to
allow them to fit into existing (limited) communications or data
storage facilities. Once divided, the individual subdivisions (BLOKs)
can not stand alone - they must be reassembled back into the single
bulletin whence they came for any processing. However, from a
communications or storage standpoint, each individual BLOK is
considered as a distinct bulletin or record and will be uniquely
identified.
The application of the BLOK feature is quite straightforward: a
given GRIB record - all the bits from "GRIB" through "7777" - may be
partitioned at any point (without any regard for the contents) or any
number of points. The only rule is that the separate parts must
contain an even number of octets. The separate parts are then encased
in a BLOK envelope (details follow), and that's it. It is, of course,
up to the receiver of a collection of BLOKs to strip off the BLOK
envelopes and put the GRIB message back together again. Just get all
the king's horses and all the king's men to help do so.
Here is the structure and content of the BLOK envelope.
Section 0 - Indicator section
Octet No. Contents
1-4 'BLOK' - 4 ASCII characters
5-7 Total length of this BLOK, in octets
8 BLOK Edition Number - currently 0
9-11 Total length of original GRIB message,
in octets
12 Flag - see Table B.1 - indicates presence
or absence of Section 1
13 Total number of related BLOKs
14 Sequence number of this BLOK
15-16 reserved, set to 0
Section 1 - Identification section - optional
If present, this section contains the complete Product Definition
Section (PDS) from the original GRIB message. If this section is
included in one BLOK, it must be included in all related BLOKs.
Section 2 - Data section
This section contains an arbitrary part of the original GRIB
message - the only restriction is that this section contain an
even number of octets.
Section 3 - End section
Octet No. Contents
1-4 '7777' - 4 ASCII characters
Table B.1
Section 1 present Flag
Bit Value Meaning
1 0 Optional Section 1 omitted
1 Optional Section 1 present
2-8 Reserved (set to 0)
Keep in mind that each subdivision of the original bulletin will
be completely surrounded by a BLOK envelope, from 'BLOK' through
'7777'.
Note that the last BLOK of a set for a given bulletin will have
two '7777's in a row; the first is the one that marks the end of the
original bulletin, the second marks the end of the (last) BLOK.
When BLOKs are sent out as individual messages with identifying
WMO headers, the 'Pxx' characters that are an optional part of the
header shall be included in the header. See Appendix A. In this way
the complete WMO header shall be unique for each message even though
the TTAAii portion of the headers will be the same, reflecting that
each BLOK, for a single GRIB message, contains the same information.
_______________________________
<1> World Meteorological Organization publication No. 306, Manual on
Codes, Vol. 1, Part B, Secretariat of the WMO, Geneva,
Switzerland, 1988, plus Supplements No. 1, 2, & 3